#pragma once

class AFX_EXT_CLASS CUtilReg
{
public:
	CUtilReg(void);
	~CUtilReg(void);

private:
	HKEY m_hKey;
	BOOL m_fCreate;

	BOOL CreateRegKey(CString strPath);
	void CloseRegKey();

public:
	DWORD ReadRegDWORD(CString strPath, CString strName, DWORD dwDefault);
	void WriteRegDWORD(CString strPath, CString strName, DWORD dwValue);

	CString ReadRegString(CString strPath, CString strName, CString strDefalut);
	void WriteRegString(CString strPath, CString strName, CString strValue);
};
